﻿/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __61CE46A2_988B_4DE3_88D3_4A72102ACA72__
#define __61CE46A2_988B_4DE3_88D3_4A72102ACA72__

namespace xos_http
{
    extern const char * i_compose_request_id;
    extern const char * i_compose_request_name;

    extern const char * i_compose_return_id;
    extern const char * i_compose_return_name;

    extern const char * i_parse_request_id;
    extern const char * i_parse_request_name;

    extern const char * i_parse_return_id;
    extern const char * i_parse_return_name;

    extern const char * cls_module_id;
    extern const char * cls_module_name;

    extern const char * i_http_mgr_id;
    extern const char * i_http_mgr_name;

    // 
    // http ret cod define
    // 
    extern const char * HTTP_RET_CODE_100;
    extern const char * HTTP_RET_CODE_101;
    extern const char * HTTP_RET_CODE_103;

    extern const char * HTTP_RET_CODE_200;
    extern const char * HTTP_RET_CODE_201;
    extern const char * HTTP_RET_CODE_202;
    extern const char * HTTP_RET_CODE_203;
    extern const char * HTTP_RET_CODE_204;
    extern const char * HTTP_RET_CODE_205;
    extern const char * HTTP_RET_CODE_206;

    extern const char * HTTP_RET_CODE_301;
    extern const char * HTTP_RET_CODE_302;
    extern const char * HTTP_RET_CODE_303;
    extern const char * HTTP_RET_CODE_304;
    extern const char * HTTP_RET_CODE_307;
    extern const char * HTTP_RET_CODE_308;

    extern const char * HTTP_RET_CODE_400;
    extern const char * HTTP_RET_CODE_401;
    extern const char * HTTP_RET_CODE_403;
    extern const char * HTTP_RET_CODE_404;
    extern const char * HTTP_RET_CODE_405;
    extern const char * HTTP_RET_CODE_406;
    extern const char * HTTP_RET_CODE_407;
    extern const char * HTTP_RET_CODE_408;
    extern const char * HTTP_RET_CODE_409;
    extern const char * HTTP_RET_CODE_410;
    extern const char * HTTP_RET_CODE_411;
    extern const char * HTTP_RET_CODE_412;
    extern const char * HTTP_RET_CODE_413;
    extern const char * HTTP_RET_CODE_414;
    extern const char * HTTP_RET_CODE_415;
    extern const char * HTTP_RET_CODE_416;
    extern const char * HTTP_RET_CODE_417;
    extern const char * HTTP_RET_CODE_418;
    extern const char * HTTP_RET_CODE_422;
    extern const char * HTTP_RET_CODE_425;
    extern const char * HTTP_RET_CODE_426;
    extern const char * HTTP_RET_CODE_428;
    extern const char * HTTP_RET_CODE_429;
    extern const char * HTTP_RET_CODE_431;
    extern const char * HTTP_RET_CODE_451;

    extern const char * HTTP_RET_CODE_500;
    extern const char * HTTP_RET_CODE_501;
    extern const char * HTTP_RET_CODE_502;
    extern const char * HTTP_RET_CODE_503;
    extern const char * HTTP_RET_CODE_504;
    extern const char * HTTP_RET_CODE_505;
    extern const char * HTTP_RET_CODE_511;

    // 
    // use tags
    // 
    extern const char * HTTP_CONTENT_ENCODING;
    extern const char * HTTP_ACCEPT_ENCODING;
    extern const char * HTTP_ZIP_DEFLATE;
    extern const char * HTTP_ZIP_GZIP;

    // 
    // http request head tags
    // 
    extern const char * HTTP_REQUEST_CMD;
    extern const char * HTTP_BODY;
    extern const char * HTTP_REQUEST_RET_CODE;
    extern const char * HTTP_REQUEST_RET_DESC;
    extern const char * HTTP_REQUEST_VER;
    extern const char * HTTP_REQUEST_URL;
    extern const char * HTTP_REQUEST_URI;
    extern const char * HTTP_REQUEST_PARAM;

    // 
    // http tags
    // 
    extern const char * HTTP_LOCATION;
    extern const char * HTTP_SERVER;
    extern const char * HTTP_ACCEPT;
    extern const char * HTTP_ACCEPT_LANGUAGE;
    extern const char * HTTP_ACCEPT_RANGES;
    extern const char * HTTP_USER_AGENT;
    extern const char * HTTP_HOST;
    extern const char * HTTP_PORT;
    extern const char * HTTP_CONTENT_LENGTH;
    extern const char * HTTP_CONTENT_RANGE;
    extern const char * HTTP_CONTENT_TYPE;
    extern const char * HTTP_CONNECTION;
    extern const char * HTTP_RANGE;
    extern const char * HTTP_DATE;

    // 
    // multipart/form-data ---- application/x-www-form-urlencoded
    // 
    extern const char * POST_TYPE_APPLICATION;
    extern const char * POST_TYPE_MULTIPART;

    extern const char * HTTP_CONTENT_DISPOSITION;
    extern const char * POST_MULTI_BOUNDARY;

    extern const char * POST_MULTI_DISP_TYPE_FORM;
    extern const char * POST_MULTI_DISP_FORM_NAME;
    extern const char * POST_MULTI_DISP_FILE_NAME;

    extern const char * MULTIPART_BODY_VALUE;
    extern const char * MULTIPART_BODY_FILE;
    extern const char * MULTIPART_BODY_LIST;

    extern const char * MULTIPART_BODY_KEY;

    // 
    // session and cookie
    // 
    extern const char * HTTP_SESSION_ID;
    extern const char * HTTP_SET_COOKIE;
    extern const char * HTTP_COOKIE;

    //
    // 最大名字和值长度，超出直接失败，防止有人搞事
    //
    extern const int MAX_VALUE_LENGTH;
    extern const int MAX_KEY_LENGTH;
    extern const int MAX_URI_LENGTH;

}

#endif // __61CE46A2_988B_4DE3_88D3_4A72102ACA72__
